Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Prevent proptype warning regarding canBePasted property #3900

Merged

Conversation

markusguenther
Copy link
Member

What I did

If clipboardNodesContextPaths.length is 0, this part will be interpreted as false (because 0 is considered "falsy" in JavaScript). The entire expression will then be 0 without evaluating the second part. This happens due to short-circuit evaluation in JavaScript.

How I did it
With this change we ensure that the value is always a boolean value.

Resolves: #3899

If clipboardNodesContextPaths.length is 0, this part will be interpreted as false (because 0 is considered "falsy" in JavaScript). The entire expression will then be 0 without evaluating the second part. This happens due to short-circuit evaluation in JavaScript.

With this change we ensure that the value is always a boolean value.
@github-actions github-actions bot added the Bug Label to mark the change as bugfix label Dec 10, 2024
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks makes sense ^^

@markusguenther markusguenther merged commit b628c59 into neos:8.3 Dec 13, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.3 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants